<?php
/*
Template Name: 单栏页面
*/
get_header();?>
<?php 
$cat = '2369';
$today = getdate();
if (ztmao('index-list1-id')) {
	$cat =  ztmao('index-list1-id');
}	
$args = array(
	'ignore_sticky_posts' => 1,
	'paged' => $paged,
	'cat'=> $cat,
	'meta_key' => 'views',
	'date_query' => array(
		array(
			'year' => $today['year']
		)
	),
	'orderby' => array('meta_value_num' => 'DESC'),
);

query_posts($args);
?>
<!--主要内容 -->
<div id="content-article">
	<div class="container">
		<div class="row row233">
			<div class="col-sm-12 col-md-8 col-lg-8 cont-left feed-infinite-wrapper" style="width: 100%;">
				<?php if(have_posts()): ?>
				<?php while(have_posts()):the_post();  ?>
				<div class="la-list01 line-botm">
					<div class="la-list-t">
						<h3>
						<?php   $custom_fields = get_post_custom_keys($post->ID);if (!in_array ('tag_value', $custom_fields)) : ?>
						<?php else: ?>
						<?php  $custom = get_post_custom($post->ID);	$custom_value = $custom['tag_value']; ?>
							<span class="hot-icon"><?php echo get_post_meta($post->ID,"tag_value",true);?></span>
						<?php endif; ?>
							<a href="<?php the_permalink(); ?>" class="htitle-color" <?php if( ztmao('ztmao_post_target')) { echo 'target="_blank"';}?>><?php the_title(); ?></a>
						</h3>
					</div>
					<ul class="clearfix">
						<?php echo ztmao_get_thumbnail();?>
					</ul>
					<div class="mob-author">
						<span class="author-face"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ) ?>" <?php if( ztmao('ztmao_post_target')) { echo 'target="_blank"';}?>><?php echo get_avatar( get_the_author_meta('email'), '25' );?></a>
						</span>
						<a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ) ?>" <?php if( ztmao('ztmao_post_target')) { echo 'target="_blank"';}?>>	
						<span class="author-name "><?php echo get_the_author() ?></span>
						</a>

						<span class="time"><?php echo timeago(get_the_time('Y-m-d G:i:s')); ?></span>
					</div>
				</div>
				<?php endwhile;  endif; ?>
			</div>
		</div>
	</div>
</div>
<div class="scroller-status" style="display: none;">
	<div class="infinite-scroll-request loader-ellips loading ball-pulse"><div></div> <div></div> <div></div> <span>加载中⋅⋅⋅</span></div>
	<p class="infinite-scroll-last transition">沒有更多了...</p>
	<p class="infinite-scroll-error transition">加载失败...</p>
</div>
<!-- 下一页链接 -->
<div class="get-mod-more js-get-mod-more-list transition" id="ias_trigger_1491535138273" style="display: none;">
<?php {
	next_posts_link('下一页', '');
} ?>	
</div>
<div class="go-top0" id="gotopbtn">
	<i class="icon icon-top"></i>
</div>
<?php get_footer('page');?>